package com.lyx.controller;

import com.lyx.entity.User;
import com.lyx.service.OpenFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OpenFeignController {
    @Autowired
    private OpenFeignService openFeignService;
    @GetMapping("/testOpenFeign1")
    public String testOpenFeign1(){
        return openFeignService.testOpenFeign1(219980822);
    }

    @GetMapping("/testOpenFeign2")
    public String testOpenFeign2(){
        User user = new User(219980822,"鲁雨鑫");
        return openFeignService.testOpenFeign2(user);
    }
}
